#include <stdio.h>
void init(int a[], int length) {
	for (int i = 0; i < length; i++) {
		a[i] = 0;
	}
}
void print(int a[], int length) {
	for (int i = 0; i < length; i++) {
		printf("%-3d", a[i]);
	}
	printf("\n");
}
void reserve(int a[], int length) {
	int left = 0;
	int right = length - 1;
	while (left <= right) {
		int mid = a[right];
		a[right] = a[left];
		a[left] = mid;
		right--;
		left++;
	}
}
int main() {
	int a[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int s = sizeof(a) / sizeof(a[0]);
	print(a, s);
	reserve(a, s);
	print(a, s);
	init(a, s);
	print(a, s);
	return 0;
}